﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Aspects
{
    public class InRangeAttribute : Attribute
    {
        #region Prop

        public object Min { get; set; }
        public object Max { get; set; }

        #endregion

        public InRangeAttribute()
        {
        }

        public InRangeAttribute(object min, object max) : this()
        {
            this.Min = min;
            this.Max = max;
        }

        public InRangeAttribute(Type dataType, string min, string max) : this()
        {
            this.Min = Convert.ChangeType(min, dataType);
            this.Max = Convert.ChangeType(max, dataType);
        }
    }
}
